package com.shigen.demo.entity.req;

import com.shigen.demo.bean.PageRequest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;

public class BaseFileFolderReq {

  @Data
  @Accessors(chain = true)
  @ApiModel(value = "创建文件夹的请求")
  public static class Create {

    @ApiModelProperty(value = "父文件夹id")
    private String parentId;

    @ApiModelProperty(value = "文件夹备注")
    private String note;

    @ApiModelProperty(value = "文件夹名")
    @NotEmpty(message = "文件夹名不能为空")
    private String name;
  }

  @Data
  @ApiModel(value = "重命名文件夹请求")
  public static class Rename {

    @ApiModelProperty(value = "新的文件名")
    @NotEmpty(message = "新的文件名不能为空")
    private String newName;

    @ApiModelProperty(value = "文件id")
    @NotNull(message = "文件的id不能为空")
    private Long id;
  }

  @Data
  @ApiModel(value = "表单列表的分页查询")
  public static class Query extends PageRequest {

    @ApiModelProperty(value = "文件夹的名字")
    private String name;
  }
}
